package cn.wolfcode.wolf2w.business.service;

import cn.wolfcode.wolf2w.business.api.domain.DestinationEs;
import cn.wolfcode.wolf2w.business.api.domain.NoteEs;
import cn.wolfcode.wolf2w.business.api.domain.StrategyEs;
import cn.wolfcode.wolf2w.business.api.domain.UserEs;
import cn.wolfcode.wolf2w.business.query.SearchQuery;
import org.springframework.data.domain.Page;

import java.lang.reflect.InvocationTargetException;

/**
 * @author : 邓风来
 * @date : 2025/9/24 9:53
 */
public interface ISearchService {
    void saveStrategy(StrategyEs strategyEs);
    void saveDestination(DestinationEs destinationEs);
    void saveNote(NoteEs noteEs);
    void saveUser(UserEs userEs);

    /**
     * 高亮查询通用接口,可以查询攻略,游记,问答,找人
     * @param clazz MySQL数据库对象
     * @param esClazz es数据库对象
     * @param qo 查询条件
     * @param column 需要查询的列
     * @return 界面需要
     * @param <T>
     */
    <T> Page<T>   searchWithHighlight(Class<T> clazz, Class<?> esClazz, SearchQuery qo,String... column) throws InvocationTargetException, IllegalAccessException;


}
